//
//  HGMinuTableViewCell.m
//  悦享
//
//  Created by dllo on 16/3/23.
//  Copyright © 2016年 张洪国. All rights reserved.
//

#import "HGMinuTableViewCell.h"
#import "SongModel.h"
@implementation HGMinuTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}

- (void)createSubViews{
    
    self.numberLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_numberLabel];
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    
    self.singerLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_singerLabel];
    
    
}

- (void)setModel:(SongModel *)model{
    _model = model;
    
    _nameLabel.text = _model.name;
    _singerLabel.text = _model.singerName;
}

- (void)layoutSubviews{
    
    _numberLabel.frame = CGRectMake(5, 2, 40, 25);
    
    _nameLabel.frame = CGRectMake(35, 2, 150, 25);
    
    _nameLabel.font = [UIFont systemFontOfSize:15];
    
    _singerLabel.frame = CGRectMake(190, 2, 100, 25);
    _singerLabel.font = [UIFont systemFontOfSize:12];
    
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
